package com.dal.kafka.controller;

import com.dal.kafka.producer.KafkaProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: spring-boot
 * @description:
 * @author: jian
 * @create: 2022-03-18 18:13
 **/
@RestController
@RequestMapping("kafka")
public class KafkaController {
    @Autowired
    private KafkaProducer kafkaProducer;
    @GetMapping("send")
    public void send(){
        kafkaProducer.send("你好啊");
    }
}
